<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
<h1>用户中心</h1>
<button class="btn">关闭窗口</button>

<script>
var btn = document.querySelector('.btn');
btn.onclick = function (){
    // 关闭窗口（只能关闭程序打开的新窗口，不能关闭用户打开的当前窗口）
    close();
}

</script>
</body>
</html>